#/bin/bash

file=$1

if [ -f $file.new ]; then
    echo $file.new exists
    echo  "\$ hbplus -o $file.new $file.pdb > $file.hblog"
    ../hbplus/hbplus -o $file.new $file.pdb >  $file.hblog
    echo  "\$ hbplus -N $file.new $file.pdb >> $file.hblog"
    ../hbplus/hbplus -N $file.new $file.pdb >> $file.hblog
else
    echo $file.new does not exist
    echo  "\$ hbplus -o $file.pdb > $file.hblog"
    ../hbplus/hbplus -o $file.pdb > $file.hblog
    echo  "\$ hbplus -N $file.pdb >> $file.hblog"
    ../hbplus/hbplus -N $file.pdb >> $file.hblog
fi
